package com.jali.crud.service;

import com.jali.crud.dao.JaUserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author jali
 * @create 2019-01-23 14:53
 */
@Service
public class JaUserService {

    @Autowired
    JaUserMapper jaUserMapper;

    public int getScoreByUserId(String userId){
        return jaUserMapper.getScoreByUserId(userId);
    }

    public void updateScoreToUser(int i, int score){
        jaUserMapper.updateScoreAddToUser(i,score);
    }

    public void updateScoreDeductToUser(int i, Integer score) {
        jaUserMapper.updateScoreDeductToUser(i,score);
    }
}
